package cn.fengsweb.tokyotyrant
{
	import flash.utils.ByteArray;
	
	internal class OutOneHandler extends AbstractHandler
	{
		public function OutOneHandler(host:String, port:uint)
		{
			super(host, port);
		}
		
		public function connect(outOne:OutOne, ttr:TokyoTyrantResponder) : void
		{
			_ttc	= new TokyoTyrantConnection(_host, _port);
			_ttr	= ttr;
			defaultHandler(outOne.sendBytes, successhandler);
		}
		
		private function successhandler(recvBytes:ByteArray):void
		{
			_ttr.result(true);
		}
	}
}